<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${pageContext.request.contextPath}/css/Style1.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="${pageContext.request.contextPath}/js/public.js"></script>


</HEAD>
<body>
	<br>
		<table cellSpacing="1" cellPadding="0" width="100%" align="center"
			bgColor="#f5fafe" border="0">
			<TBODY>
				<tr>
					<td class="ta_01" align="center" bgColor="#afd1f3"><strong>用户列表</strong>
					</TD>
				</tr>
				<tr>
					<td class="ta_01" align="center" bgColor="#f5fafe">
						<table cellspacing="0" cellpadding="1" rules="all"
							bordercolor="gray" border="1" id="DataGrid1"
							style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 100%; WORD-BREAK: break-all; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #f5fafe; WORD-WRAP: break-word">
							<tr
								style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 25px; BACKGROUND-COLOR: #afd1f3">

								<td align="center" width="10%">用户Id</td>
								<td align="center" width="10%">用户名</td>
								<td align="center" width="10%">密码</td>
								<td align="center" width="20%">性别</td>
								<td align="center" width="43%">签名</td>
								<td width="7%" align="center">删除</td>
							</tr>
							<c:forEach var="user" items="${requestScope.list}">
								<tr onmouseover="this.style.backgroundColor = 'white'"
									onmouseout="this.style.backgroundColor = '#F5FAFE';">
								<!--文章Id-->
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										width="10%">${user.userId}</td>
								<!-- 作者Id -->
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										width="10%">${user.userName}</td>
								<!-- 类别Id -->
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										width="10%">${user.password}</td>
								<!-- 文章题目 -->
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										width="20%">${user.sex}</td>
								<!-- 文章内容 -->
									<td style="CURSOR: hand; HEIGHT: 22px" align="center"
										width="43%">${user.signature}</td>

								<!-- 删除数据 -->
								<td align="center" style="HEIGHT: 22px">
									<a href="javaScript:void(0)" onclick='userDelete("${user.userId}")'> 
										<img src="${pageContext.request.contextPath}/images/i_del.png"
											width="16" height="16" border="0" style="CURSOR: hand">
									</a>
								</td>
							</tr>
							</c:forEach>
						</table>
					</td>
				</tr>

			</TBODY>
		</table>
		
	<script type="text/javascript">
		function userDelete(userId) {
			var choose = confirm("确认删除?");
			if (choose) {
				window.location = "${pageContext.request.contextPath}/User?method=delete&userId=" + userId;
			}
		}
	</script>
</body>
</HTML>

